package com.wx.factorybean;

import com.wx.bean.People;
import org.springframework.beans.factory.FactoryBean;

/**
 * MyOriginalFactoryBean 的 beanName 为 &myOriginalFactoryBean
 */
public class MyOriginalFactoryBean implements FactoryBean<People> {

	/**
	 * 默认是懒加载的，getObject() 的 beanName 为 myOriginalFactoryBean
	 */
	@Override
	public People getObject() throws Exception {
		return new People("FactoryBean", 18);
	}

	@Override
	public Class<?> getObjectType() {
		return People.class;
	}
}
